package com.mobile.persistent.base;

import java.io.Serializable;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.SessionFactoryUtils;

import com.mobile.common.base.hibernate.SimpleDao;



public abstract class BaseDao<T, PK extends Serializable> extends SimpleDao<T, PK> {

	@Resource SessionFactory sessionFactory;
	
	@Override
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}
	
	public Session getSession(){
		return SessionFactoryUtils.getSession(sessionFactory, true);
	}
}
